package com.zxjbyte.yiyi.module.system.domain.param;

import com.zxjbyte.yiyi.framework.common.domain.KVStore;
import com.zxjbyte.yiyi.framework.common.annotation.InEnumValue;
import com.zxjbyte.yiyi.framework.oss.enums.OssStorageEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @Author zhangxingjia
 * @Date 2023/5/11 16:28
 * @Version: 1.0
 */
@Data
@Schema(description = "对象存储配置新增请求结构体")
public class OssConfigAddParam {

    @Schema(description = "配置名")
    private String name;

    @Schema(description = "存储器编号 [10001:db, 10002:local, 10003:s3]")
    @NotNull(message = "存储器编号不能为空")
    @InEnumValue(enumClass = OssStorageEnum.class)
    private String storageCode;

    @Schema(description = "存储配置是动态参数")
    @NotEmpty(message = "存储配置不能为空")
    private KVStore config;
}
